import service from "@/service/http.interceptor";


/**
 * c端添加用户地址
 */
export const addAddress = (data) => {
	return service.request({
		method: 'post',
		url: 'shop_user/address/c/add',
		data,
		custom: {
			loading: true
		}
	})	
}

/**
 * c端更新用户地址
 */
export const updateAddress = (data) => {
	return service.request({
		method: 'post',
		url: 'shop_user/address/c/update',
		data,
		custom: {
			loading: true
		}
	})	
}

/**
 * c端删除用户地址
 */
export const deleteAddress = (data) => {
	return service.request({
		method: 'post',
		url: 'shop_user/address/c/delete',
		data,
		custom: {
			loading: true
		}
	})	
}

/**
 * 分页获取用户地址
 */
export const pageAddress = (params) => {
	return service.request({
		method: 'get',
		url: 'shop_user/address/c/page',
		params,
		custom: {
			loading: true
		}
	})	
}


/**
 * 分页获取用户地址
 */
export const addressInfo = (params) => {
	return service.request({
		method: 'get',
		url: 'shop_user/address/c/info',
		params,
		custom: {
			loading: true
		}
	})	
}

/**
 * 用户默认地址
 */
export const defaultAddress = (params) => {
	return service.request({
		method: 'get',
		url: 'shop_user/address/c/default',
		params,
		custom: {
			loading: true
		}
	})	
}